import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import path from 'path';
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';

export default defineConfig(() => {
	return {
		server: {
			host: true
		},
		resolve: {
			alias: {
				'@': path.resolve(__dirname, './src'),
				'~': path.resolve(__dirname, '.')
			}
		},
		plugins: [
			uni(),
			AutoImport({
				imports: ['vue', 'vue-router', 'uni-app', 'pinia']
			}),
			Components({})
		]
	};
});
